﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.Entity;
using MySql.Data.Entity;

namespace DAL
{
    [DbConfigurationType(typeof(MySqlEFConfiguration))]
    public class ShopDBContext : DbContext
    {
        public ShopDBContext()
            : base("MySQLConnectionString")
        {
            Database.SetInitializer<ShopDBContext>(new ContextDBInitializer());
        }

        public DbSet<User> Users { get; set; }
        public DbSet<Product> Products { get; set; }
        public DbSet<ProductCategory> ProductCategories { get; set; }
    }
}
